package top.coolxue.crud.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.coolxue.common.BaseService;
import top.coolxue.common.result.JsonResult;
import top.coolxue.crud.dao.UserMapper;
import top.coolxue.crud.domain.User;

@Service
public class UserService extends BaseService<User> {

    public static final Logger logger = LoggerFactory.getLogger(UserService.class);

    @Autowired
    private UserMapper userMapper;

    public JsonResult getDetail(int id) {

        User user = userMapper.selectByPrimaryKey(id);
        return new JsonResult(true, "获取成功", user);
    }
}
